Import('env')

#
# Auxiliary modules
#

SConscript('auxiliary/SConscript')
SConscript('auxiliary/pipe-loader/SConscript')

#
# Drivers
#

# These are common and work across all platforms
SConscript([
    'drivers/llvmpipe/SConscript',
    'drivers/softpipe/SConscript',
    'drivers/svga/SConscript',
])

#
# Winsys
#

SConscript([
    'winsys/sw/null/SConscript',
    'winsys/sw/wrapper/SConscript',
])

if env['x11']:
    SConscript([
        'winsys/sw/xlib/SConscript',
    ])

if env['platform'] == 'windows':
    SConscript([
        'winsys/sw/gdi/SConscript',
    ])


#
# Frontends and targets
#

if not env['embedded']:
    if env['x11']:
        SConscript([
            'frontends/glx/xlib/SConscript',
            'targets/libgl-xlib/SConscript',
        ])

    if env['platform'] == 'windows':
        SConscript([
            'frontends/wgl/SConscript',
            'targets/libgl-gdi/SConscript',
        ])
